<?php

/*
**	ACTION processResponse
**	Process authentication response
*/

// TODO: Compute the proper outcome
$outcome = 'authSuccess';

switch ($outcome) {
	/*
		Outcome: Authentication successful
		- Return user to originating page.
		- If user does not exist locally, create user in database.
		- If user exists, update his user record from Twitter information.
	*/
	case 'authSuccess':
		$messageClass = 'success';
		redirect('/ligature/editPost');
		break;
	/*
		Outcome: Authentication failed
		- Return user to originating page.
	*/
	case 'authFailed':
		$messageClass = 'failure';
		redirect('/ligature/editPost');
		break;
	default:
		show_error("Unexpected outcome '$outcome' to action 'processResponse' on page 'callback'.");
}

/* clickframes::version=109290285::clickframes */
?>